﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using TS3QueryLib.Core.Common;

namespace TS3QueryLib.Tests.Common
{
    [TestClass]
    public class Ts3UtilTest
    {
        [TestMethod]
        public void TestEncodeString()
        {
            Assert.AreEqual(@"s\p\slala\n\t", Ts3Util.EncodeString("s| lala\n\t"));
        }

        [TestMethod]
        public void TestDecodeString()
        {
            Assert.AreEqual(@"server\p", Ts3Util.DecodeString(@"server\\p"));
            Assert.AreEqual(@"server\p| lala", Ts3Util.DecodeString(@"server\\p\p\slala"));
        }
    }
}
